﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/HomePage.Master" AutoEventWireup="true"
    Codebehind="PriceList.aspx.cs" Inherits="Indeco.G24.Website.Price.Admin.PriceList"
    Title="Quản lý bảng giá" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
<script type="text/javascript"><!--
function ShowAddDiaBanWindow() {
    addDiaBan.Show();
}
function ShowSanPhamDanhMucWindow() {
    addSanPhamDanhMuc.Show();
    //tbUsername.Focus();
}
//--></script>
    <dxpc:ASPxPopupControl id="addDiaBan" runat="server" CloseAction="CloseButton" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="addDiaBan" HeaderText="Thêm tỉnh/thành phố" AllowDragging="True" EnableAnimation="False" CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" ImageFolder="~/App_Themes/Glass/{0}/" Width="602px">
        <ContentCollection>
            <dxpc:PopupControlContentControl runat="server">
                <asp:Panel ID="Panel1" runat="server" Font-Bold="True" GroupingText="Tỉnh / Th&#224;nh phố ">
                    <div>
                        &nbsp;<table border="0" cellpadding="3" cellspacing="0">
                            <tr>
                                <td align="left" valign="top">
                    
                        <asp:DropDownList ID="addListDiaBan" runat="server">
                        </asp:DropDownList>
                                    &nbsp;
                                    <br />
                                </td>
                                <td align="left" valign="top">
                                    <asp:Label ID="Label4" runat="server" Text="Tỉnh / Th&#224;nh đang cung cấp:"></asp:Label>
                                    &nbsp;
                                    <div style="text-align:right;">
                                        <asp:CheckBoxList ID="listDiaBanDangSuDung" runat="server" BorderWidth="0px" CellPadding="1"
                            CellSpacing="1" RepeatColumns="3" RepeatDirection="Horizontal" Width="97%">
                                        </asp:CheckBoxList>
                                        <asp:Button ID="btnRemoveDiaBan" runat="server" OnClick="btnRemoveDiaBan_Click" OnClientClick="javascript:return confirm('Ch&#250; &#253;:\n Tất cả danh mục v&#224; bảng gi&#225; của địa b&#224;n n&#224;y cũng sẽ bị x&#243;a')"
                                            Text="Gỡ bỏ" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                        &nbsp;
                    </div>
                </asp:Panel>
                <br />
                <asp:Panel ID="PanelSanPhamDanhMuc" runat="server" Font-Bold="False" GroupingText="&lt;b&gt;Chọn danh mục cung cấp:&lt;/b&gt;&lt;font color=red &gt; *&lt;/font&gt; "
                    HorizontalAlign="Left">
                    <div style="overflow-y: scroll; height: 200px">
                        <asp:CheckBoxList ID="addlistSanPhamDanhMuc" runat="server" BorderWidth="0px" CellPadding="1"
                            CellSpacing="1" RepeatColumns="3" RepeatDirection="Horizontal" Width="97%" DataTextField="Ten" DataValueField="IDSanPhamDanhMuc">
                        </asp:CheckBoxList>
                        &nbsp;&nbsp;
                    </div>
                </asp:Panel>
                <div style="text-align:center;">
                    <table>
                        <tr>
                            <td style="width: 100px; height: 51px" valign="bottom">
                                <dxe:ASPxButton ID="btnThemMoiDiaBan" runat="server" Text="Th&#234;m mới"
                                    Width="80px" CausesValidation="False" OnClick="btnThemMoiDiaBan_Click">
                                    <ClientSideEvents Click="function(s, e) {
	//if(ASPxClientEdit.ValidateGroup('entryGroup'))
	   // addDiaBan.Hide();
}" />
                                </dxe:ASPxButton>
                            </td>
                            <td style="width: 100px; height: 51px" valign="bottom">
                                <dxe:ASPxButton ID="btnHuyCapNhatDiaBan" runat="server" AutoPostBack="False" Text="Hủy bỏ" Width="80px">
                                    <ClientSideEvents Click="function(s, e) {
                            addDiaBan.Hide();
                            }" />
                                </dxe:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </div>
            </dxpc:PopupControlContentControl>
        </ContentCollection>
        <ClientSideEvents PopUp="function(s, e) {
	ASPxClientEdit.ClearGroup('entryGroup');	
}" />
        <CloseButtonImage Height="17px" Width="17px" />
        <SizeGripImage Height="12px" Width="12px" />
        <HeaderStyle>
            <Paddings PaddingLeft="10px" PaddingRight="6px" PaddingTop="1px" />
        </HeaderStyle>
        <ContentStyle HorizontalAlign="Left">
        </ContentStyle>
    </dxpc:ASPxPopupControl>
    <dxpc:ASPxPopupControl id="addSanPhamDanhMuc" runat="server" CloseAction="CloseButton" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="addSanPhamDanhMuc" HeaderText="Thêm danh mục sản phẩm" AllowDragging="True" EnableAnimation="False" CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" ImageFolder="~/App_Themes/Glass/{0}/" Width="604px">
        <ContentCollection>
            <dxpc:PopupControlContentControl runat="server">
                <asp:Panel ID="panelDanhMucDangCungCap" runat="server" Font-Bold="False" GroupingText="Tỉnh / Th&#224;nh phố ">
                    <table border="0" cellpadding="2" cellspacing="0" width="99%">
                        <tr>
                            <td align="left" valign="top">
                                <asp:Label ID="Label10" runat="server" Font-Bold="True" Text="Danh mục đ&#227; chọn:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" valign="top">
                                <div style="overflow-y:Auto; height: 80px">
                                    <asp:CheckBoxList ID="listDanhMucSanPhamDaChon" runat="server" BorderWidth="0px" CellPadding="1" CellSpacing="1" RepeatColumns="3" RepeatDirection="Horizontal" Width="97%" DataTextField="Ten" DataValueField="IDSanPhamDanhMuc">
                                    </asp:CheckBoxList>
                                </div>
                                <div style="text-align:right; padding:5px;">
                                    <asp:Button ID="btnRemoveSanPhamDanhMuc" runat="server" OnClick="btnRemoveSanPhamDanhMuc_Click" OnClientClick="javascript:return confirm('Ch&#250; &#253;:\n Tất cả danh mục v&#224; bảng gi&#225; của địa b&#224;n n&#224;y cũng sẽ bị x&#243;a')" Text="Gỡ bỏ" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                    <br />
                    <br />
                <asp:Panel ID="Panel2" runat="server" Font-Bold="False" GroupingText="&lt;b&gt;Chọn danh mục cung cấp:&lt;/b&gt;&lt;font color=red &gt; *&lt;/font&gt; "
                    HorizontalAlign="Left">
                    <div style="overflow-y: scroll; height: 180px">
                        <asp:CheckBoxList ID="addlistSanPhamDanhMuc2" runat="server" BorderWidth="0px" CellPadding="1"
                            CellSpacing="1" RepeatColumns="3" RepeatDirection="Horizontal" Width="97%" DataTextField="Ten" DataValueField="IDSanPhamDanhMuc">
                        </asp:CheckBoxList>
                    </div>
                </asp:Panel>
                    <table>
                        <tr>
                            <td style="width: 100px; height: 51px" valign="bottom">
                                <dxe:ASPxButton ID="btnThemMoiSanPhamDanhMuc" runat="server" Text="Th&#234;m mới"
                                    Width="80px" OnClick="btnThemMoiSanPhamDanhMuc_Click" CausesValidation="False">
                                    <ClientSideEvents Click="function(s, e) {
	//addSanPhamDanhMuc.Hide();
}" />
                                </dxe:ASPxButton>
                            </td>
                            <td style="width: 100px; height: 51px" valign="bottom">
                                <dxe:ASPxButton ID="btnHuyCapNhatDanhMuc" runat="server" AutoPostBack="False" Text="Hủy bỏ" Width="80px">
                                    <ClientSideEvents Click="function(s, e) {addSanPhamDanhMuc.Hide();}" />
                                </dxe:ASPxButton>
                            </td>
                        </tr>
                    </table>
            </dxpc:PopupControlContentControl>
        </ContentCollection>
        <ClientSideEvents PopUp="function(s, e) {
	ASPxClientEdit.ClearGroup('entryGroup');	
}" />
        <CloseButtonImage Height="17px" Width="17px" />
        <SizeGripImage Height="12px" Width="12px" />
        <HeaderStyle>
            <Paddings PaddingLeft="10px" PaddingRight="6px" PaddingTop="1px" />
        </HeaderStyle>
    </dxpc:ASPxPopupControl>

<div style="padding-left: 5px; width: 100%; height: 20px; text-align: left">
        <asp:SiteMapPath ID="G24SiteMap1" runat="server" Font-Size="8pt" CurrentNodeStyle-Font-Bold="true">
        </asp:SiteMapPath>
    </div>
    <asp:Panel ID="PanelCreateBangGiaSanPham" runat="server" Width="99%" Visible="true" Font-Bold="True" Font-Size="Medium" GroupingText="Tạo bảng giá<a name='createPrice'></a>">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td nowrap="nowrap" align="center" style="padding: 0px; text-align: center; width: 100%;">
                    <dxtc:ASPxPageControl ID="tabTaoBangGia" runat="server" ActiveTabIndex="0" SkinID="TabPageDefault"
                        Width="668px">
                        <TabPages>
                            <dxtc:TabPage Text="Th&#244;ng tin bảng gi&#225;">
                                <ContentCollection>
                                    <dxw:ContentControl runat="server">
                                        <table cellpadding="6" cellspacing="1" style="background-color: #bbbbbb;">
                                            <tr>
                                                <td nowrap="nowrap" style="background-color: #E0EFF5; text-align: left; vertical-align: top;">
                                                    <asp:Label ID="Label1" Font-Size="Smaller" Font-Bold="True" runat="server" Text="Đơn gi&#225; c&#243; hiệu lực đến ng&#224;y:"></asp:Label>
                                                    <dxe:ASPxDateEdit ID="thoiDiemHetHieuLuc" runat="server" AllowNull="False" AutoResizeWithContainer="True"
                                                        ClientInstanceName="thoiDiemHetHieuLucClient" EditFormat="DateTime" CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" ImageFolder="~/App_Themes/Glass/{0}/">
                                                        <ValidationSettings ErrorDisplayMode="ImageWithTooltip">
                                                            <RequiredField IsRequired="True" />
                                                            <RegularExpression ErrorText="Nhập ng&#224;y hết hiệu lực b&#225;o gi&#225;" />
                                                            <ErrorFrameStyle ImageSpacing="4px">
                                                                <ErrorTextPaddings PaddingLeft="4px" />
                                                            </ErrorFrameStyle>
                                                            <ErrorImage Height="14px" Url="~/App_Themes/Glass/Editors/edtError.png" Width="14px" />
                                                        </ValidationSettings>
                                                        <CalendarProperties>
                                                            <FastNavProperties Enabled="False" />
                                                            <FooterStyle Spacing="4px" />
                                                            <HeaderStyle Spacing="1px" />
                                                        </CalendarProperties>
                                                        <ButtonStyle Cursor="pointer" Width="13px">
                                                        </ButtonStyle>
                                                    </dxe:ASPxDateEdit>
                                                </td>
                                                <td nowrap="nowrap" style="background-color: #E0EFF5; text-align: left; vertical-align: top;">
                                                    <asp:Label ID="Label9" Font-Size="Smaller" Font-Bold="True" runat="server" Text="Tỉnh / Th&#224;nh:"></asp:Label>&nbsp;
                                                    <br />
                                                    <asp:DropDownList ID="listDiaBan" runat="server" AutoPostBack="True" OnSelectedIndexChanged="listDiaBan_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                    &nbsp;<dxe:ASPxImage ID="btnAddDiaBan" runat="server" Cursor="pointer" ImageAlign="Middle"
                                                        ImageUrl="~/App_Themes/Default/Images/addnew.png">
                                                        <ClientSideEvents Click="function(s, e) { ShowAddDiaBanWindow(); }" />
                                                    </dxe:ASPxImage>
                                                </td>
                                                <td nowrap="nowrap" colspan="2" style="background-color: #E0EFF5; text-align: left;
                                                    vertical-align: top;">
                                                    <asp:Label ID="Label2" Font-Size="Smaller" Font-Bold="True" runat="server" Text="Nh&#243;m sản phẩm:"></asp:Label>&nbsp;<br />
                                                    <asp:DropDownList ID="listSanPhamDanhMuc" runat="server" DataTextField="Ten" DataValueField="IDSanPhamDanhMuc">
                                                    </asp:DropDownList>
                                                    &nbsp;<dxe:ASPxImage ID="btnAddSanPhamDanhMuc" runat="server" Cursor="pointer" ImageAlign="Middle"
                                                        ImageUrl="~/App_Themes/Default/Images/addnew.png">
                                                        <ClientSideEvents Click="function(s, e) { ShowSanPhamDanhMucWindow(); }" />
                                                    </dxe:ASPxImage>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" nowrap="nowrap" style="background-color: #e0eff5; text-align: left">
                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="text-align: left; vertical-align: top;" nowrap="nowrap">
                                                                <asp:Label ID="Label6" runat="server" Font-Size="Smaller" Font-Bold="True" Text="T&#234;n sản phẩm - Quy c&#225;ch:"></asp:Label>
                                                                <asp:RequiredFieldValidator Text="&nbsp;*&nbsp;" ErrorMessage="Nhập tên sản phẩm" controltovalidate="txtTenSanPham" id="Requiredfieldvalidator1" enableclientscript="true" display="Dynamic" SetFocusOnError="true" runat="server"/>
                                                                <br />
                                                                <asp:TextBox ID="txtTenSanPham" runat="server" Width="226px" onkeyup="initTyper(this);"></asp:TextBox>
                                                            </td>
                                                            <td style="text-align: left; vertical-align: top; padding-left: 6px;">
                                                                <asp:Label ID="Label5" runat="server" Font-Size="Smaller" Font-Bold="True" Text="Đơn vị t&#237;nh:"></asp:Label>
                                                                <br />
                                                                <asp:TextBox ID="txtDonViTinh" runat="server" Width="69px" onkeyup="initTyper(this);"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td nowrap="nowrap" style="background-color: #e0eff5; text-align: left; vertical-align: top;">
                                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                        <tr>
                                                            <td nowrap="nowrap" style="text-align: left; vertical-align: top; padding-right: 5px;">
                                                                <asp:Label ID="Label7" runat="server" Font-Size="Smaller" Font-Bold="True" Text="Đơn gi&#225; chưa c&#243; thuế VAT:"></asp:Label>
                                                                <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtGiasanpham" Text="&nbsp;*&nbsp;" ErrorMessage="Giá sản phẩm không hợp lệ" enableclientscript="true" MinimumValue="0" SetFocusOnError="True" MaximumValue="999999999999999999999999999" Type="Double"></asp:RangeValidator>
                                                                <br />
                                                                <asp:TextBox ID="txtGiasanpham" runat="server" Width="133px"></asp:TextBox>
                                                            </td>
                                                            <td nowrap="nowrap" style="text-align: left; vertical-align: top; padding-right: 5px;">
                                                                <br />
                                                                <asp:DropDownList ID="listNgoaite" runat="server">
                                                                </asp:DropDownList></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td nowrap="nowrap" style="background-color: #e0eff5; text-align: left; vertical-align: top;">
                                                    <asp:Label ID="Label8" runat="server" Font-Size="Smaller" Font-Bold="True" Text="VAT:"></asp:Label>
                                                    <br />
                                                    <asp:DropDownList ID="listVAT" runat="server">
                                                        <asp:ListItem Value="0">------</asp:ListItem>
                                                        <asp:ListItem Value="5">5 %</asp:ListItem>
                                                        <asp:ListItem Value="10">10 %</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td nowrap="nowrap" style="background-color: #E0EFF5; text-align: left; height: 41px;">
                                                    <asp:Label ID="Label17" Font-Size="Smaller" Font-Bold="True" runat="server" Text="Ti&#234;u chuẩn kỹ thuật:"></asp:Label>
                                                    &nbsp;<br />
                                                    <asp:TextBox ID="txtTCKT" runat="server" Width="134px" onkeyup="initTyper(this);"></asp:TextBox></td>
                                                <td nowrap="nowrap" style="background-color: #E0EFF5; text-align: left; height: 41px;" colspan="3">
                                                    <asp:Label ID="Label3" Font-Size="Smaller" Font-Bold="True" runat="server" Text="Nh&#224; sản xuất:"></asp:Label>
                                                    &nbsp;<br />
                                                    <asp:TextBox ID="txtNhaSanXuat" runat="server" Width="301px" onkeyup="initTyper(this);"></asp:TextBox></td>
                                            </tr>
                                        </table>
                                    </dxw:ContentControl>
                                </ContentCollection>
                            </dxtc:TabPage>
                            <dxtc:TabPage Text="Th&#244;ng tin th&#234;m về sản phẩm">
                                <ContentCollection>
                                    <dxw:ContentControl runat="server">
                                        <dxhe:ASPxHtmlEditor ID="txtThongTinThem" runat="server" Height="158px" Width="100%"
                                            CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" onkeyup="initTyper(this);">
                                            <Images ImageFolder="~/App_Themes/Glass/{0}/">
                                                <DialogFormCloseButton Height="17px" Width="17px" />
                                            </Images>
                                            <StylesToolbars>
                                                <BarDockControl HorizontalAlign="Left">
                                                </BarDockControl>
                                                <Toolbar ItemSpacing="0px" SeparatorHeight="100%">
                                                </Toolbar>
                                            </StylesToolbars>
                                            <SettingsImageUpload>
                                                <ValidationSettings AllowedContentTypes="image/jpeg,image/pjpeg,image/gif,image/png,image/x-png">
                                                </ValidationSettings>
                                            </SettingsImageUpload>
                                            <StylesStatusBar>
                                                <ActiveTab>
                                                    <Paddings PaddingBottom="5px" PaddingTop="4px" />
                                                </ActiveTab>
                                                <Tab>
                                                    <Paddings PaddingBottom="5px" PaddingTop="4px" />
                                                </Tab>
                                                <StatusBar TabSpacing="0px">
                                                </StatusBar>
                                            </StylesStatusBar>
                                            <StylesRoundPanel>
                                                <ControlStyle BackColor="#EBF2F4">
                                                    <Border BorderColor="#7EACB1" BorderStyle="Solid" BorderWidth="1px" />
                                                </ControlStyle>
                                            </StylesRoundPanel>
                                            <Styles CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass">
                                                <ViewArea>
                                                    <Border BorderColor="#4986A2" BorderStyle="Solid" BorderWidth="1px" />
                                                </ViewArea>
                                            </Styles>
                                            <Settings AllowHtmlView="False" AllowPreview="False" />
                                            <PartsRoundPanel>
                                                <BottomRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpBottomRightCorner.png"
                                                    Width="5px" />
                                                <HeaderRightEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderRightEdge.gif"
                                                        VerticalPosition="bottom" />
                                                </HeaderRightEdge>
                                                <BottomLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpBottomLeftCorner.png"
                                                    Width="5px" />
                                                <RightEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpLeftRightEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </RightEdge>
                                                <NoHeaderTopLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpNoHeaderTopLeftCorner.png"
                                                    Width="5px" />
                                                <LeftEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpLeftRightEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </LeftEdge>
                                                <NoHeaderTopRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpNoHeaderTopRightCorner.png"
                                                    Width="5px" />
                                                <TopRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpTopRightCorner.png"
                                                    Width="5px" />
                                                <HeaderLeftEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderLeftEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </HeaderLeftEdge>
                                                <TopLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpTopLeftCorner.png"
                                                    Width="5px" />
                                                <NoHeaderTopEdge BackColor="#EBF2F4">
                                                </NoHeaderTopEdge>
                                                <BottomEdge BackColor="#D7E9F1">
                                                </BottomEdge>
                                                <HeaderContent>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderBack.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </HeaderContent>
                                                <Content>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpContentBack.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </Content>
                                            </PartsRoundPanel>
                                            <Toolbars>
                                                <dxhe:StandardToolbar2>
                                                    <Items>
                                                        <dxhe:ToolbarFontNameEdit>
                                                            <Items>
                                                                <dxe:ListEditItem Text="Times New Roman" Value="Times New Roman">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Tahoma" Value="Tahoma">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Verdana" Value="Verdana">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Arial" Value="Arial">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="MS Sans Serif" Value="MS Sans Serif">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Courier" Value="Courier">
                                                                </dxe:ListEditItem>
                                                            </Items>
                                                        </dxhe:ToolbarFontNameEdit>
                                                        <dxhe:ToolbarFontSizeEdit>
                                                            <Items>
                                                                <dxe:ListEditItem Text="1 (8pt)" Value="1">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="2 (10pt)" Value="2">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="3 (12pt)" Value="3">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="4 (14pt)" Value="4">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="5 (18pt)" Value="5">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="6 (24pt)" Value="6">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="7 (26pt)" Value="7">
                                                                </dxe:ListEditItem>
                                                            </Items>
                                                        </dxhe:ToolbarFontSizeEdit>
                                                        <dxhe:ToolbarBoldButton BeginGroup="True">
                                                        </dxhe:ToolbarBoldButton>
                                                        <dxhe:ToolbarItalicButton>
                                                        </dxhe:ToolbarItalicButton>
                                                        <dxhe:ToolbarUnderlineButton>
                                                        </dxhe:ToolbarUnderlineButton>
                                                        <dxhe:ToolbarStrikethroughButton>
                                                        </dxhe:ToolbarStrikethroughButton>
                                                        <dxhe:ToolbarJustifyLeftButton BeginGroup="True">
                                                        </dxhe:ToolbarJustifyLeftButton>
                                                        <dxhe:ToolbarJustifyCenterButton>
                                                        </dxhe:ToolbarJustifyCenterButton>
                                                        <dxhe:ToolbarJustifyRightButton>
                                                        </dxhe:ToolbarJustifyRightButton>
                                                        <dxhe:ToolbarJustifyFullButton>
                                                        </dxhe:ToolbarJustifyFullButton>
                                                        <dxhe:ToolbarBackColorButton BeginGroup="True">
                                                        </dxhe:ToolbarBackColorButton>
                                                        <dxhe:ToolbarFontColorButton>
                                                        </dxhe:ToolbarFontColorButton>
                                                    </Items>
                                                </dxhe:StandardToolbar2>
                                            </Toolbars>
                                        </dxhe:ASPxHtmlEditor>
                                    </dxw:ContentControl>
                                </ContentCollection>
                            </dxtc:TabPage>
                            <dxtc:TabPage Text="Ch&#237;nh s&#225;ch b&#225;n h&#224;ng">
                                <ContentCollection>
                                    <dxw:ContentControl runat="server">
                                        <dxhe:ASPxHtmlEditor ID="txtChinhSachBanHang" runat="server" Height="158px" Width="100%"
                                            CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass">
                                            <Images ImageFolder="~/App_Themes/Glass/{0}/">
                                                <DialogFormCloseButton Height="17px" Width="17px" />
                                            </Images>
                                            <StylesToolbars>
                                                <BarDockControl HorizontalAlign="Left">
                                                </BarDockControl>
                                                <Toolbar ItemSpacing="0px" SeparatorHeight="100%">
                                                </Toolbar>
                                            </StylesToolbars>
                                            <SettingsImageUpload>
                                                <ValidationSettings AllowedContentTypes="image/jpeg,image/pjpeg,image/gif,image/png,image/x-png">
                                                </ValidationSettings>
                                            </SettingsImageUpload>
                                            <StylesStatusBar>
                                                <ActiveTab>
                                                    <Paddings PaddingBottom="5px" PaddingTop="4px" />
                                                </ActiveTab>
                                                <Tab>
                                                    <Paddings PaddingBottom="5px" PaddingTop="4px" />
                                                </Tab>
                                                <StatusBar TabSpacing="0px">
                                                </StatusBar>
                                            </StylesStatusBar>
                                            <StylesRoundPanel>
                                                <ControlStyle BackColor="#EBF2F4">
                                                    <Border BorderColor="#7EACB1" BorderStyle="Solid" BorderWidth="1px" />
                                                </ControlStyle>
                                            </StylesRoundPanel>
                                            <Styles CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass">
                                                <ViewArea>
                                                    <Border BorderColor="#4986A2" BorderStyle="Solid" BorderWidth="1px" />
                                                </ViewArea>
                                            </Styles>
                                            <Settings AllowHtmlView="False" AllowPreview="False" />
                                            <PartsRoundPanel>
                                                <BottomRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpBottomRightCorner.png"
                                                    Width="5px" />
                                                <HeaderRightEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderRightEdge.gif"
                                                        VerticalPosition="bottom" />
                                                </HeaderRightEdge>
                                                <BottomLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpBottomLeftCorner.png"
                                                    Width="5px" />
                                                <RightEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpLeftRightEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </RightEdge>
                                                <NoHeaderTopLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpNoHeaderTopLeftCorner.png"
                                                    Width="5px" />
                                                <LeftEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpLeftRightEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </LeftEdge>
                                                <NoHeaderTopRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpNoHeaderTopRightCorner.png"
                                                    Width="5px" />
                                                <TopRightCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpTopRightCorner.png"
                                                    Width="5px" />
                                                <HeaderLeftEdge>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderLeftEdge.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </HeaderLeftEdge>
                                                <TopLeftCorner Height="5px" Url="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpTopLeftCorner.png"
                                                    Width="5px" />
                                                <NoHeaderTopEdge BackColor="#EBF2F4">
                                                </NoHeaderTopEdge>
                                                <BottomEdge BackColor="#D7E9F1">
                                                </BottomEdge>
                                                <HeaderContent>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpHeaderBack.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </HeaderContent>
                                                <Content>
                                                    <BackgroundImage ImageUrl="~/App_Themes/Glass/HtmlEditor/RoundPanel/herpContentBack.gif"
                                                        Repeat="RepeatX" VerticalPosition="bottom" />
                                                </Content>
                                            </PartsRoundPanel>
                                            <Toolbars>
                                                <dxhe:StandardToolbar2>
                                                    <Items>
                                                        <dxhe:ToolbarFontNameEdit>
                                                            <Items>
                                                                <dxe:ListEditItem Text="Times New Roman" Value="Times New Roman">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Tahoma" Value="Tahoma">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Verdana" Value="Verdana">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Arial" Value="Arial">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="MS Sans Serif" Value="MS Sans Serif">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="Courier" Value="Courier">
                                                                </dxe:ListEditItem>
                                                            </Items>
                                                        </dxhe:ToolbarFontNameEdit>
                                                        <dxhe:ToolbarFontSizeEdit>
                                                            <Items>
                                                                <dxe:ListEditItem Text="1 (8pt)" Value="1">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="2 (10pt)" Value="2">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="3 (12pt)" Value="3">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="4 (14pt)" Value="4">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="5 (18pt)" Value="5">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="6 (24pt)" Value="6">
                                                                </dxe:ListEditItem>
                                                                <dxe:ListEditItem Text="7 (26pt)" Value="7">
                                                                </dxe:ListEditItem>
                                                            </Items>
                                                        </dxhe:ToolbarFontSizeEdit>
                                                        <dxhe:ToolbarBoldButton BeginGroup="True">
                                                        </dxhe:ToolbarBoldButton>
                                                        <dxhe:ToolbarItalicButton>
                                                        </dxhe:ToolbarItalicButton>
                                                        <dxhe:ToolbarUnderlineButton>
                                                        </dxhe:ToolbarUnderlineButton>
                                                        <dxhe:ToolbarStrikethroughButton>
                                                        </dxhe:ToolbarStrikethroughButton>
                                                        <dxhe:ToolbarJustifyLeftButton BeginGroup="True">
                                                        </dxhe:ToolbarJustifyLeftButton>
                                                        <dxhe:ToolbarJustifyCenterButton>
                                                        </dxhe:ToolbarJustifyCenterButton>
                                                        <dxhe:ToolbarJustifyRightButton>
                                                        </dxhe:ToolbarJustifyRightButton>
                                                        <dxhe:ToolbarJustifyFullButton>
                                                        </dxhe:ToolbarJustifyFullButton>
                                                        <dxhe:ToolbarBackColorButton BeginGroup="True">
                                                        </dxhe:ToolbarBackColorButton>
                                                        <dxhe:ToolbarFontColorButton>
                                                        </dxhe:ToolbarFontColorButton>
                                                    </Items>
                                                </dxhe:StandardToolbar2>
                                            </Toolbars>
                                        </dxhe:ASPxHtmlEditor>
                                    </dxw:ContentControl>
                                </ContentCollection>
                            </dxtc:TabPage>
                        </TabPages>
                    </dxtc:ASPxPageControl>
                    <asp:Label ID="lblError" runat="server" SkinID="lblError"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: center; vertical-align: top; padding: 9px; width: 100%;">
                    <asp:Button ID="BtnTaomoibanggia" runat="server" Text="Tạo mới" CssClass="button"
                        OnClick="BtnTaomoibanggia_Click" />
                    <asp:Button ID="BtnUpdatebanggia" runat="server" Text="Lưu thay đổi" CssClass="button"
                        Visible="false" />
                    <input id="Reset1" title="Nhập lại" type="reset" value="Nhập lại" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <div style="text-align:right; width:98%; padding-top:10px;">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Price/Admin/PriceList.aspx">
            <asp:Image ID="Image1" runat="server" ToolTip="Làm mới bảng giá" ImageUrl="~/Images/Refresh.png" BorderWidth="0" />
        </asp:HyperLink>
    </div>
    <asp:Panel ID="PanelBangGiaSanPham" runat="server" Width="99%" Visible="true">
    </asp:Panel>
    <%-- BeginRegion DropDown --%>
<%--    Group by:
    <select id="selGridLayout" onchange="grid.PerformCallback(this.value);">
        <option selected="selected" value="0">Địa bàn/Danh mục</option>
        <option value="1">Tỉnh / Thành</option>
        <option value="2">Danh mục</option>
    </select>--%>
    <%-- EndRegion --%>
<%--    &nbsp;
    <input type="button" onclick="grid.CollapseAll();" value="Collapse All Rows" />
    &nbsp;
    <input type="button" onclick="grid.ExpandAll();" value="Expand All Rows" />
    <br />
    <br />--%>
    <table cellpadding="0" cellspacing="0" style="width: 255px">
        <tr>
            <td class="buttonCell" style="width: 50%; height: 49px">
                <asp:Button ID="btnXlsExport" runat="server" CausesValidation="False" Text="Xuất ra Exel" OnClick="btnXlsExport_Click"/>
            </td>
            <td class="buttonCell" style="width: 50%; height: 49px">
                <asp:Button ID="btnRtfExport" runat="server" CausesValidation="False" Text="Xuất ra RTF" OnClick="btnRtfExport_Click" />
            </td>
        </tr>
    </table>
    <dxwgv:ASPxGridView Visible="false" ID="BangGiaSanPham" SettingsPager-PageSize="200" ClientInstanceName="grid"
        runat="server" KeyFieldName="KeyBangGia" Width="100%" AutoGenerateColumns="False"
        CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" DataSourceID="BangGiaSanPhamDataSource">
        <SettingsEditing Mode="Inline" />
        <Columns>
            <dxwgv:GridViewDataTextColumn FieldName="IDDiaBanSource.Ten" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Tỉnh / Thành phố" VisibleIndex="0">
                <DataItemTemplate>
                    <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("IDDiaBanSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.IDSanPhamDanhMucSource.Ten"
                HeaderStyle-Font-Bold="true" CellStyle-HorizontalAlign="Left" Caption="Danh mục"
                VisibleIndex="1">
                <DataItemTemplate>
                    <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("IDSanPhamSource.IDSanPhamDanhMucSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.Ten" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Tên sản phẩm" VisibleIndex="2">
                <DataItemTemplate>
                    <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("IDSanPhamSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.DonViTinh" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Đơn vị tính" VisibleIndex="3">
                <DataItemTemplate>
                    <asp:Label ID="lblDonViTinh" runat="server" Text='<%# Eval("IDSanPhamSource.DonViTinh") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="TieuChuanKyThuat" Caption="TCKT" HeaderStyle-Font-Bold="true"
                VisibleIndex="4">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="DonGia" Caption="Đơn giá" HeaderStyle-Font-Bold="true"
                VisibleIndex="5">
                <DataItemTemplate>
                    <asp:Label ID="lblDonGia" runat="server" Text='<%# String.Format("{0:N}", Eval("DonGia")) + " " + Eval("IDNgoaiTeSource.KyHieu") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="VAT" Caption="VAT" CellStyle-Wrap="False"
                HeaderStyle-Font-Bold="true" VisibleIndex="6">
                <DataItemTemplate>
                    <asp:Label ID="lblVAT" runat="server" Text='<%# Eval("VAT") + " %" %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn CellStyle-HorizontalAlign="Left" FieldName="Thongtinthem"
                VisibleIndex="6" HeaderStyle-Font-Bold="true" Caption="Ghi chú">
            </dxwgv:GridViewDataTextColumn>
        </Columns>
        <Styles CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <GroupPanel HorizontalAlign="Left">
            </GroupPanel>
            <GroupRow HorizontalAlign="Left" Font-Bold="true">
            </GroupRow>
        </Styles>
        <Settings ShowFilterRow="True" ShowGroupPanel="True" />
        <Images ImageFolder="~/App_Themes/Glass/{0}/">
            <PopupEditFormWindowClose Height="17px" Width="17px" />
            <CollapsedButton Height="12px" Width="11px" />
            <DetailCollapsedButton Height="9px" Width="9px" />
        </Images>
        <%-- <TotalSummary>
            <dxwgv:ASPxSummaryItem FieldName="IDSanPham" SummaryType="Count" />
            <dxwgv:ASPxSummaryItem FieldName="DonGia" SummaryType="Sum" DisplayFormat="c" />
        </TotalSummary>--%>
        <%-- <Templates>
          <EditForm>
          <div style="padding:4px 4px 3px 4px">
 
                     <uc1:frmNhapBangGia ID="FrmNhapBangGia1" runat="server" ID_DiaBan='<%# Eval("IDDiaBan") %>' ID_NhaCungCap='<%# Eval("IDNhaCungCap") %>' ID_SanPham='<%# Eval("IDSanPham") %>' KeyBangGia='<%# Eval("KeyBangGia") %>'/>
                         <dxwgv:ASPxGridViewTemplateReplacement ID="Editors" ReplacementType="EditFormCancelButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
                     
             </div>
             <div style="text-align:right; padding:2px 2px 2px 2px">
                 <dxwgv:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
                 <dxwgv:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
             </div>

          </EditForm>
      </Templates>--%>
    </dxwgv:ASPxGridView>
    <br />
    <dxwgv:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="BangGiaSanPham">
    </dxwgv:ASPxGridViewExporter>
    &nbsp;<br />
    <data:BangGiaSanPhamDataSource ID="BangGiaSanPhamDataSource" runat="server" EnableDeepLoad="true"
        EnableRecursiveDeepLoad="true" SelectMethod="GetPaged" EnableSorting="true">
        <DeepLoadProperties Method="IncludeChildren" Recursive="true">
            <Types>
                <data:BangGiaSanPhamProperty Name="SanPham" />
                <data:SanPhamProperty Name="SanPhamDanhMuc" />
                <data:BangGiaSanPhamProperty Name="NhaCungCap" />
                <data:BangGiaSanPhamProperty Name="DiaBan" />
                <data:BangGiaSanPhamProperty Name="NgoaiTe" />
            </Types>
        </DeepLoadProperties>
        <Parameters>
            <data:SqlParameter Name="WhereClause" UseParameterizedFilters="false">
                <Filters>
                    <data:BangGiaSanPhamFilter Column="IDNhaCungCap" ComparisionType="Equals" SessionField="IDNhaCungCap" />
                </Filters>
            </data:SqlParameter>
            <data:SqlParameter Name="orderBy" DefaultValue="ThoiDiemCapNhat">
            </data:SqlParameter>
        </Parameters>
    </data:BangGiaSanPhamDataSource>
</asp:Content>
